<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: owen
  Date: 2017/3/26
  Time: 16:32
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<c:set var="BASE" value="${pageContext.request.contextPath}"/>
<jsp:include page="side.jsp"/>
<jsp:include page="easyui.jsp"/>
<html>
<head>
    <title>模糊搜索</title>
</head>
<body>
<form action="/product_search" method="post">
    <input type="text" name="name">
    <input type="submit" value="搜索">

</form>
    <h1>产品列表</h1>


    <table id="tt" class="easyui-datagrid" style="width: 1000px;height:auto;" >
        <thead>
        <tr>
            <th field="name1" width="100">编号</th>
            <th field="name2" width="100">名称</th>
            <th field="name3" width="100">经手</th>
            <th field="name4" width="100">录入</th>
            <th field="name5" width="100">保修</th>
            <th field="name6" width="100">品牌</th>
            <th field="name7" width="100">价格</th>
            <th field="name8" width="100">备注</th>
            <th field="name9" width="140">操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach  var="product" items="${productList}">
            <tr>
                <td>${product.id}</td>
                <td>${product.name}</td>
                <td>${product.handler}</td>
                <td>${product.time}</td>
                <td>${product.guarantee}</td>
                <td>${product.brand}</td>
                <td>${product.price}</td>
                <td>${product.remark}</td>
                <td>
                    <a href="${BASE}/product_edit?id=${product.id}">编辑</a>
                    <a href="${BASE}/product_delete?id=${product.id}">删除</a>
                </td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
</body>
</html>
